package com.frank.biz.project.service.impl;

import java.util.List;
import com.frank.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.frank.biz.project.mapper.BizProjectMapper;
import com.frank.biz.project.domain.BizProject;
import com.frank.biz.project.service.IBizProjectService;
import com.frank.common.core.text.Convert;

/**
 * 汇报信息Service业务层处理
 * 
 * @author frank
 * @date 2024-09-10
 */
@Service
public class BizProjectServiceImpl implements IBizProjectService 
{
    @Autowired
    private BizProjectMapper bizProjectMapper;

    /**
     * 查询汇报信息
     * 
     * @param id 汇报信息主键
     * @return 汇报信息
     */
    @Override
    public BizProject selectBizProjectById(Long id)
    {
        return bizProjectMapper.selectBizProjectById(id);
    }

    /**
     * 查询汇报信息列表
     * 
     * @param bizProject 汇报信息
     * @return 汇报信息
     */
    @Override
    public List<BizProject> selectBizProjectList(BizProject bizProject)
    {
        return bizProjectMapper.selectBizProjectList(bizProject);
    }

    /**
     * 新增汇报信息
     * 
     * @param bizProject 汇报信息
     * @return 结果
     */
    @Override
    public int insertBizProject(BizProject bizProject)
    {
        bizProject.setCreateTime(DateUtils.getNowDate());
        return bizProjectMapper.insertBizProject(bizProject);
    }

    /**
     * 修改汇报信息
     * 
     * @param bizProject 汇报信息
     * @return 结果
     */
    @Override
    public int updateBizProject(BizProject bizProject)
    {
        bizProject.setUpdateTime(DateUtils.getNowDate());
        return bizProjectMapper.updateBizProject(bizProject);
    }

    /**
     * 批量删除汇报信息
     * 
     * @param ids 需要删除的汇报信息主键
     * @return 结果
     */
    @Override
    public int deleteBizProjectByIds(String ids)
    {
        return bizProjectMapper.deleteBizProjectByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除汇报信息信息
     * 
     * @param id 汇报信息主键
     * @return 结果
     */
    @Override
    public int deleteBizProjectById(Long id)
    {
        return bizProjectMapper.deleteBizProjectById(id);
    }
}
